package com.tian.core.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Actiongroup entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "actiongroup", catalog = "portalservermond")
public class Actiongroup implements java.io.Serializable {

	// Fields

	private Integer id;
	private Group group;
	private Action action;
	private Integer masterid;
	private String mastername;
	private Date createdate;

	// Constructors

	/** default constructor */
	public Actiongroup() {
	}

	/** minimal constructor */
	public Actiongroup(Group group, Action action, Integer masterid) {
		this.group = group;
		this.action = action;
		this.masterid = masterid;
	}

	/** full constructor */
	public Actiongroup(Group group, Action action, Integer masterid,
			String mastername, Date createdate) {
		this.group = group;
		this.action = action;
		this.masterid = masterid;
		this.mastername = mastername;
		this.createdate = createdate;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "groupid", nullable = false)
	public Group getGroup() {
		return this.group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "actionid", nullable = false)
	public Action getAction() {
		return this.action;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	@Column(name = "masterid")
	public Integer getMasterid() {
		return this.masterid;
	}

	public void setMasterid(Integer masterid) {
		this.masterid = masterid;
	}

	@Column(name = "mastername", length = 100)
	public String getMastername() {
		return this.mastername;
	}

	public void setMastername(String mastername) {
		this.mastername = mastername;
	}

	@Column(name = "createdate", length = 0)
	public Date getCreatedate() {
		return this.createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

}